<script setup>
import { defineProps } from "vue";
const props = defineProps({
  rentInfo: {
    type: Object,
    required: true,
  },
});
</script>
<template>
  <view>
    <div class="rent-history">
      <div class="rent-info">
        <div class="info-item">
          <div>押金</div>
          <div>-¥{{ props.rentInfo.deposit }}</div>
        </div>
        <div class="info-item">
          <div>第一期租金</div>
          <div>-¥{{ props.rentInfo.rent }}</div>
        </div>
        <div class="info-item">
          <div>更换车辆</div>
          <div>-¥{{ props.rentInfo.service_fee }}</div>
        </div>
        <div class="info-item">
          <div>退还车辆</div>
          <div>+¥{{ props.rentInfo.deposit_return }}</div>
        </div>
      </div>
    </div>
  </view>
</template>

<style scoped>
.rent-history {
  width: 100%;
  height: 128px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding: 0 24px;
  background-color: #f7fff3;
  border-radius: 10px;
  box-sizing: border-box;
}

.rent-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  row-gap: 4px;
  justify-content: flex-start;
  font-size: 12px;
}

.info-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}
</style>
